//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
   banner_swiper:{
      indicatorDots:true,
      autoplay:false,
      interval:5000,
      duration:500,
      circular:false,
      imgUrls:[
        '../../image/imageIndex/banner1.png',
        '../../image/imageIndex/banner2.png'
      ]
    }, 
    classify:[
      {
      imgUrl:'../../image/imageIndex/home_btn_girl.png',
      name:'气质'
      },
      {
      imgUrl:'../../image/imageIndex/home_btn_health.png',
      name:'健康'
      },
      {
      imgUrl:'../../image/imageIndex/home_btn_work.png',
      name:'职场'
      },
      {
      imgUrl:'../../image/imageIndex/home_btn_child.png',
      name:'育儿'
      },
      {
      imgUrl:'../../image/imageIndex/home_btn_all.png',
      name:'全部'
      }
    ],
    hotCourse:[
      {
        imgUrl:'../../image/imageIndex/Bitmap1.png',
        title:'如何让你表达有爱又有效',
        peopleName:'美丽学院',
        listenNum:168
      },
      {
        imgUrl:'../../image/imageIndex/Bitmap4.png',
        title:'如何让你表达有爱又有效',
        peopleName:'美丽学院',
        listenNum:163
      },
      {
        imgUrl:'../../image/imageIndex/Bitmap6.png',
        title:'如何让你表达有爱又有效',
        peopleName:'美丽学院',
        listenNum:164
      }
    ],
    newCourse:[
      {
        imgUrl:'../../image/imageIndex/Bitmap4.png',
        title:'如何让你表达有爱又有效',
        peopleName:'美丽学院',
        listenNum:163
      },
      {
        imgUrl:'../../image/imageIndex/Bitmap6.png',
        title:'如何让你表达有爱又有效',
        peopleName:'美丽学院',
        listenNum:162
      },
      {
        imgUrl:'../../image/imageIndex/Bitmap1.png',
        title:'如何让你表达有爱又有效',
        peopleName:'美丽学院',
        listenNum:163
      }
    ],
    special:[
      '../../image/imageIndex/Group1.png',
      '../../image/imageIndex/Group2.png',
      '../../image/imageIndex/Group3.png',
       '../../image/imageIndex/Group.png'
    ],
    classicalReading:[
      {
        imgUrl:'../../image/book/Bitmap1.png',
        bookName:'理性的抉择',
        describe:'教你如何做决定'
      },{
        imgUrl:'../../image/book/Bitmap2.png',
        bookName:'理性的抉择',
        describe:'教你如何做决定'
      },{
        imgUrl:'../../image/book/Bitmap3.png',
        bookName:'理性的抉择',
        describe:'教你如何做决定'      
      }
    ]


  },
  allTo:function(event){
    if(event.currentTarget.dataset.allto == 4){
      wx.navigateTo({
        url: '../classify/classify?title='+'全部分类'
      })
    }
  },
  audioTo:function(){
      wx.navigateTo({
        url: '../audio/audio'
      })
  },
  onLoad: function () {
    
  },
  onShareAppMessage: function (res) {
    if (res.from === 'button') {
              // 来自页面内转发按钮
    };
    return {
      title:'童话故事',
      path: '/pages/index/index',
      success: function(res) {
        // 转发成功
        console.log("shareAppMessage: ok")
        console.log(res);
      },
      fail: function(res) {
        // 转发失败
        console.log(res);
      }
    }
  }
})
